//
//  JMTextField.m
//  xpkc
//
//  Created by TopSage OS X on 15/11/30.
//  Copyright © 2015年 TopSage. All rights reserved.
//

#import "JMTextField.h"

@implementation JMTextField

-(void)drawPlaceholderInRect:(CGRect)rect{
    
    UIColor * placeholderColor = [UIColor lightGrayColor];
    
    [placeholderColor setFill];
    CGRect placeholderRect = CGRectMake(rect.origin.x + 10, (rect.size.height- self.font.pointSize)/2, rect.size.width, self.font.pointSize);
    UIFont * font = nil;
    
    if (SCREEN_HEIGHT ==480) {
        font =[UIFont systemFontOfSize:16];
    }else if ( SCREEN_HEIGHT ==567){
        font =[UIFont systemFontOfSize:17];
    }else if(SCREEN_HEIGHT ==667){
        font =[UIFont systemFontOfSize:18];
        
    }
    
    [self.placeholder drawInRect:placeholderRect withFont:font];
    
}

@end
